﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
	mc:Ignorable="d"
	x:Class="MVVM_CAD.DrawedFiguresList"
	x:Name="UserControl"
	d:DesignWidth="325" d:DesignHeight="133.929" DataContext="{Binding Main, Source={StaticResource Locator}}" Width="324">
	<Grid x:Name="LayoutRoot" Margin="0,-24,0,0">
		<VisualStateManager.VisualStateGroups>
			<VisualStateGroup x:Name="VisualStateGroup">
				<VisualStateGroup.Transitions>
					<VisualTransition GeneratedDuration="0:0:0.5"/>
					<VisualTransition From="CollapseState" GeneratedDuration="0:0:0.5" To="ExpandedState">
						<Storyboard>
							<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="listBox">
								<DiscreteObjectKeyFrame KeyTime="0:0:0.5" Value="{x:Static Visibility.Visible}"/>
							</ObjectAnimationUsingKeyFrames>
						</Storyboard>
					</VisualTransition>
				</VisualStateGroup.Transitions>
				<VisualState x:Name="CollapseState"/>
				<VisualState x:Name="ExpandedState">
					<Storyboard>
						<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Height)" Storyboard.TargetName="rectangle">
							<EasingDoubleKeyFrame KeyTime="0" Value="157.9"/>
						</DoubleAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="listBox">
							<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
						</ObjectAnimationUsingKeyFrames>
						<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)" Storyboard.TargetName="listBox">
							<EasingColorKeyFrame KeyTime="0" Value="#FF3D3D3D"/>
						</ColorAnimationUsingKeyFrames>
						<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="listBox">
							<EasingDoubleKeyFrame KeyTime="0" Value="-10"/>
						</DoubleAnimationUsingKeyFrames>
						<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="listBox">
							<EasingDoubleKeyFrame KeyTime="0" Value="-1"/>
						</DoubleAnimationUsingKeyFrames>
						<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="expander">
							<EasingDoubleKeyFrame KeyTime="0" Value="-124"/>
						</DoubleAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>
			</VisualStateGroup>
		</VisualStateManager.VisualStateGroups>
		<Grid>
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="0.268*"/>
				<ColumnDefinition Width="0.732*"/>
			</Grid.ColumnDefinitions>
			<Rectangle x:Name="rectangle" Fill="#FF3D3D3D" Stroke="#FF3D3D3D" RadiusX="5" RadiusY="5" StrokeThickness="5" Grid.ColumnSpan="2" RenderTransformOrigin="0.5,0.5" Height="33.88" VerticalAlignment="Bottom" Width="324">
				<Rectangle.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</Rectangle.RenderTransform>
			</Rectangle>
            <ListBox x:Name="listBox" Margin="8,16.442,8,30.558" Background="#FF3D3D3D" BorderBrush="#FF3D3D3D" Grid.ColumnSpan="2" Foreground="#FFFAF7F7" RenderTransformOrigin="0.5,0.5" Visibility="Hidden" Width="287" ItemsSource="{Binding DrawedFigures}" DisplayMemberPath="Name">
				<ListBox.RenderTransform>
            		<TransformGroup>
            			<ScaleTransform/>
            			<SkewTransform/>
            			<RotateTransform/>
            			<TranslateTransform X="-10"/>
            		</TransformGroup>
            	</ListBox.RenderTransform>
            </ListBox>
			<Label Content="Elementos Dibujados" Margin="6,0,-40,3.939" Foreground="#FFFAF7F7" Height="27" VerticalAlignment="Bottom"/>
            <Label Content="{Binding DrawedFigures.Count}" Grid.Column="1" HorizontalAlignment="Left" Margin="40,0,0,3.939" Width="34.9" Foreground="#FFFAF7F7" Height="27" VerticalAlignment="Bottom"/>
            <Expander x:Name="expander" Grid.Column="1" Header="" Margin="211.795,0,3,3.939" Height="22.864" VerticalAlignment="Bottom" ExpandDirection="Up" RenderTransformOrigin="0.5,0.5">
            	<Expander.RenderTransform>
            		<TransformGroup>
            			<ScaleTransform/>
            			<SkewTransform/>
            			<RotateTransform/>
            			<TranslateTransform/>
            		</TransformGroup>
            	</Expander.RenderTransform>
            	<i:Interaction.Triggers>
            		<i:EventTrigger EventName="Collapsed">
            			<ei:GoToStateAction x:Name="Collapse" StateName="CollapseState"/>
            		</i:EventTrigger>
            		<i:EventTrigger EventName="Expanded">
            			<ei:GoToStateAction x:Name="Extended" StateName="ExpandedState"/>
            		</i:EventTrigger>
            	</i:Interaction.Triggers>
            </Expander>
		</Grid>
	</Grid>
</UserControl>